//
//  YYLinkShareAlertView.m
//  YYLinkShareView
//
//  Created by 云眼科技 on 16/6/6.
//  Copyright © 2016年 CloudEyes. All rights reserved.
//

#import "YYLinkShareAlertView.h"
#import "WeiboSDK.h"

@implementation YYLinkShareAlertView



+(void)showMessageWithTitle:(NSString *)title message:(NSString *)message withStyle:(YYLinkAlertStyle)style{
    NSString *btnTitle = nil;
    switch (style) {
        case YYLinkAlertStyleOK:
            btnTitle = @"确定";
            break;
        case YYLinkAlertStyleCancel:
            btnTitle = @"取消";
            break;
        default:
            break;
    }
    
    UIAlertView *alert = [[UIAlertView alloc] initWithTitle:title message:message delegate:nil cancelButtonTitle:btnTitle otherButtonTitles:nil];
    [alert show];
    
}

+(void)handleSendResult:(QQApiSendResultCode)sendResult{
    NSString *message = nil;
    switch (sendResult){
        case EQQAPISENDSUCESS:
            message = @"分享成功";
            break;
        case EQQAPIAPPNOTREGISTED:
            message = @"App未注册";
            break;
        case EQQAPIMESSAGECONTENTINVALID:
        case EQQAPIMESSAGECONTENTNULL:
        case EQQAPIMESSAGETYPEINVALID:
            message = @"发送参数错误";            
            break;
        case EQQAPIQQNOTINSTALLED:
            message = @"未安装QQ客户端";
            break;
        case EQQAPIQQNOTSUPPORTAPI:
            message = @"API接口不支持";
            break;
        case EQQAPISENDFAILD:
            message = @"发送失败";
            break;
        case EQQAPIVERSIONNEEDUPDATE:
            message = @"当前QQ版本太低，需要更新";
            break;
        default:
            break;
    }
    UIAlertView *msgbox = [[UIAlertView alloc] initWithTitle:@"分享完成" message:message delegate:nil cancelButtonTitle:@"确定" otherButtonTitles:nil];
    [msgbox show];
}










@end
